package com.vshop;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/* 自定义数据源一定要排除SpringBoot自动配置数据源，不然会出现循环引用的问题，The dependencies of some of the beans in the application context form a cycle
项目启动的注解：并且排除自动注入数据源的配置，可以自定义配置多数据源 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})

/* 开启缓存注解*/
@EnableCaching

/*开启异步任务*/
@EnableAsync

/*开启定时启动功能*/
@EnableScheduling

@ComponentScan(basePackages = "com.vshop.*")

/**
 * 项目访问入口呀
 * @author lm
 * @date 2020/6/9 17:26
 */
public class VShopApplication {
    public static void main(String[] args) {
        try {
            SpringApplication.run(VShopApplication.class, args);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

}
